GtkIconHelper: Short circuit _gtk_icon_helper_get_size in some cases
authorAlexander Larsson <alexl@redhat.com>
Tue, 12 Aug 2014 10:34:12 +0000 (12:34 +0200)
committerAlexander Larsson <alexl@redhat.com>
Tue, 12 Aug 2014 13:47:42 +0000 (15:47 +0200)
commit928822f1a5f2e5302c9bc5cfe98f5960e97d61de
treea27541402e246819ec1c9ead7f8d0c33c1887687
parent8ff47570af18c42800c629e6c0ec6e98f2302f18
GtkIconHelper: Short circuit _gtk_icon_helper_get_size in some cases

_gtk_icon_helper_get_size() is often used during size request and may
not necessary mean that the icon will be displayed immediately. In
many common cases we know the size without having to ensure a surface.
In many cases this means we can avoid loading an icon until needed, and
in the case of stateless IconHelpers such as GtkCellRendererPixbuf this
is very important as otherwise it will constantly be reloading icons
if the displayed set is larger than the in-memory icon cache.

https://bugzilla.gnome.org/show_bug.cgi?id=734651
gtk/gtkiconhelper.c